<h2>New User</h2>

<%= error_messages_for 'user'%>
<%= form_tag %>
<table>
    <tr>
        <td>User name:</td>
        <td> <%= text_field("user", "name")%> </td>
    <tr>
    <tr>
        <td>Password:</td>
        <td> <%= password_field("user", "password")%> </td>
    </tr>

    <% if session[:user_role] == 'Super Admin' -%>
      <tr>
        <td>Community ID:</td>
        <td> <%= text_field("user", "community_id")%> </td>
      </tr>
      <tr>
        <td>Role:</td>
        <td> <%= text_field("user", "role") %> </td>
      </tr>
    <% end -%>

    <tr>
        <td></td>
        <td><input type= "submit" value=" ADD USER "/></td>
    </tr>
</table>
<%= end_form_tag %>
